<template>
	<view class="new-detail-layout">
		<view class="detail-header">
			<u-text :size="25" :text="item.title || ''"></u-text>
		</view>
		<view class="publish-info">
			<view class="left">
				编辑: {{ item.author }}
			</view>
			<view class="right">
				发布日期：{{ dayjs.unix(item.posttime).format('YYYY-MM-DD HH:mm:ss') }}
			</view>
		</view>
		<!-- #ifdef H5 -->
		<view class="content" v-html="item.content || ''"></view>
		<!-- #endif -->
		<!-- #ifdef MP-WEIXIN -->
		 <mp-html :content="item.content" />
		<!-- #endif -->
	</view>
</template>

<script setup>
import dayjs from '@/node_modules/dayjs'
 defineProps({
	 item: {
		 type: Object,
		 default: () => {}
	 }
 })
</script>

<style lang="scss">
.new-detail-layout {
	padding: 10rpx 20rpx;
	.detail-header{
	:deep(.u-text__value){
			padding: 10rpx 20rpx !important;
			// font-size: 45rpx !important;
			font-weight: 700;
			overflow: hidden;
			text-overflow: ellipsis;
			display: -webkit-box;
			-webkit-line-clamp: 2;
			line-clamp: 2;
			-webkit-box-orient: vertical;
			line-height: 1.5em;
			text-align: left;
		}
	}
	.publish-info {
		display: flex;
		justify-content: space-between;
		align-items: center;
		background-color: #f6f6f6;
		padding: 20rpx;
		margin: 30rpx 0;
		font-size: 26rpx;
		color: #666;
		border-radius: 10rpx;
	}
	.content {
		:deep() {
			img {
				width: 100% !important;
			}
		}
	}
}
</style>